<?php
/**
 * 公用仓储类
 * User: 13651
 * Time: 2025/9/8 17:32
 */

namespace App\Repository;

class CommonRepo
{
    protected static $instance = [];
    public function __construct(){}
    public function __clone(){}

    public static function getInstance()
    {
        if((static::$instance[static::class] ?? []) instanceof static) {
            return static::$instance[static::class];
        }
        return static::$instance[static::class] = new static();
    }
}